package com.stats.ultimate;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.*;
import android.content.*;

public class Teams extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.teams);
        
        // Instantiate 2 buttons to start new activities
        Button create = (Button) findViewById(R.id.create_team);
        Button edit = (Button) findViewById(R.id.edit_team);
        
        // Set onClickListener for create button
        create.setOnClickListener(new View.OnClickListener() {
			// Override onClick function
			@Override
			public void onClick(View arg0) {
				// Start create_team activity
				Intent start_create = new Intent(getApplicationContext(), Create.class);
				startActivity(start_create);
			}
		});
        
        // Set onClickListener for edit button
        edit.setOnClickListener(new View.OnClickListener() {
			// Override onClick function
			@Override
			public void onClick(View arg0) {
				// Start choose activity
				Intent start_choose = new Intent(getApplicationContext(), Choose.class);
				start_choose.putExtra("arg", 0);
				startActivity(start_choose);
			}
		});
    }
}
